﻿Public Class Localize
    Private Shared Chinese As New Dictionary(Of String, String) From {{"I detect that you have made same changes to the same thing. Click yes to override the original one", "我发现你对同一样东西做了修改,点是覆盖修改"}, _
        {"Attention", "请注意"}, {"Save successfully!", "保存成功"}, {"Clearing missing CASP needs some time, are you sure to continue?", "请注意,清理遗失CASP需要一段时间, 你要继续吗?"}}

    Public Shared Function Localize(ByVal key As String) As String
        Dim theUsecCulture = System.Globalization.CultureInfo.CurrentCulture
        If theUsecCulture.ToString.Contains("zh") = True AndAlso Chinese.ContainsKey(key) = True Then
            Return Chinese.Item(key)
        Else
            Return key
        End If
    End Function

End Class
